﻿using System.ServiceProcess;

namespace ARchGL.Platform.WindowsService
{
    static class Program
    {
        /// <summary>
        /// 应用程序的主入口点。
        /// </summary>
        static void Main()
        {
#if DEBUG
            var led = new ARchGL.Platform.WindowsService.Application.LEDService();
            try
            {
                //led.SendContent(new Core.ResultDto("--------" + DateTime.Now.ToString("HH:mm:ss")));

                var content = led.RequestContent();
                //led.SendContent(content);

                led.SendBitmap(content);
            }

            catch (System.Exception ex)
            {
                led.SendContent(ex.Message);
            }

            return;
#endif

            var servicesToRun = new ServiceBase[]
            {
                new ProjectLEDService()
            };
            ServiceBase.Run(servicesToRun);
        }
    }
}
